﻿namespace ACCOUNTING
{
    using ACCOUNTING.LVY.Business;
    using ACCOUNTING.My;
    using ACCOUNTING.My.Resources;
    using C1.Win.C1Input;
    using Microsoft.VisualBasic.CompilerServices;
    using System;
    using System.Collections.Generic;
    using System.ComponentModel;
    using System.Diagnostics;
    using System.Drawing;
    using System.Runtime.CompilerServices;
    using System.Windows.Forms;

    [DesignerGenerated]
    public class Frm_SoDuDauKyTaiSan : Form
    {
        private static List<WeakReference> __ENCList = new List<WeakReference>();
        [AccessedThroughProperty("AdvBoPhan")]
        private ADVList _AdvBoPhan;
        [AccessedThroughProperty("AdvHopDong")]
        private ADVList _AdvHopDong;
        [AccessedThroughProperty("AdvSanPham")]
        private ADVList _AdvSanPham;
        [AccessedThroughProperty("AdvTKChiPhi")]
        private ADVAccount _AdvTKChiPhi;
        [AccessedThroughProperty("AdvTKKhauHao")]
        private ADVAccount _AdvTKKhauHao;
        [AccessedThroughProperty("AdvTKNguyenGia")]
        private ADVAccount _AdvTKNguyenGia;
        [AccessedThroughProperty("CboLoaiTaiSan")]
        private ComboBox _CboLoaiTaiSan;
        [AccessedThroughProperty("CboLoaiTien")]
        private ComboBox _CboLoaiTien;
        [AccessedThroughProperty("CmdCancel")]
        private Button _CmdCancel;
        [AccessedThroughProperty("CmdOK")]
        private Button _CmdOK;
        [AccessedThroughProperty("CmdShow")]
        private Button _CmdShow;
        [AccessedThroughProperty("GroupBox1")]
        private GroupBox _GroupBox1;
        [AccessedThroughProperty("Label10")]
        private Label _Label10;
        [AccessedThroughProperty("Label11")]
        private Label _Label11;
        [AccessedThroughProperty("Label12")]
        private Label _Label12;
        [AccessedThroughProperty("Label13")]
        private Label _Label13;
        [AccessedThroughProperty("Label17")]
        private Label _Label17;
        [AccessedThroughProperty("Label20")]
        private Label _Label20;
        [AccessedThroughProperty("Label21")]
        private Label _Label21;
        [AccessedThroughProperty("Label22")]
        private Label _Label22;
        [AccessedThroughProperty("Label24")]
        private Label _Label24;
        [AccessedThroughProperty("Label27")]
        private Label _Label27;
        [AccessedThroughProperty("Label28")]
        private Label _Label28;
        [AccessedThroughProperty("Label6")]
        private Label _Label6;
        [AccessedThroughProperty("Label7")]
        private Label _Label7;
        [AccessedThroughProperty("Label8")]
        private Label _Label8;
        [AccessedThroughProperty("TxtDaKhauHao")]
        private C1NumericEdit _TxtDaKhauHao;
        [AccessedThroughProperty("TxtMaTaiSan")]
        private TextBox _TxtMaTaiSan;
        [AccessedThroughProperty("TxtNguyenGia")]
        private C1NumericEdit _TxtNguyenGia;
        [AccessedThroughProperty("TxtNguyenGiaNT")]
        private C1NumericEdit _TxtNguyenGiaNT;
        [AccessedThroughProperty("TxtTenTaiSan")]
        private TextBox _TxtTenTaiSan;
        [AccessedThroughProperty("TxtTriGiaConLai")]
        private C1NumericEdit _TxtTriGiaConLai;
        [AccessedThroughProperty("txtTyGia")]
        private C1NumericEdit _txtTyGia;
        private string cFrmFormat;
        public string cFrmKhoa;
        public string cFrmNamThang;
        private IContainer components;
        private clsSoDuDauKyTaiSan objTS;
        private clsTaiSanCoDinh objTSCD;

        public Frm_SoDuDauKyTaiSan()
        {
            base.Load += new EventHandler(this.Frm_SoDuDauKyTaiSan_Load);
            List<WeakReference> list = __ENCList;
            lock (list)
            {
                __ENCList.Add(new WeakReference(this));
            }
            this.cFrmKhoa = "";
            this.objTSCD = new clsTaiSanCoDinh();
            this.objTS = new clsSoDuDauKyTaiSan();
            this.InitializeComponent();
        }

        public bool checkIvalid()
        {
            if (LVYModule.ReturnIfNull(this.TxtMaTaiSan.Text, "", modGeneral.TypeOfValue.Nothing).ToString().Trim() == "")
            {
                LVYModule.ShowWarning(modGeneral.Tranlated("Bạn phải chọn t\x00e0i sản!", ""));
                this.TxtMaTaiSan.Focus();
                return false;
            }
            return true;
        }

        private void CmdCancel_Click(object sender, EventArgs e)
        {
            this.Dispose();
        }

        private void CmdOK_Click(object sender, EventArgs e)
        {
            if (this.checkIvalid())
            {
                this.Save();
            }
        }

        private void CmdShow_Click(object sender, EventArgs e)
        {
            MyProject.Forms.Frm_SearchTaiSanCoDinh.objFrmSoDuDauKy = true;
            MyProject.Forms.Frm_SearchTaiSanCoDinh.pNamThang = this.cFrmNamThang;
            MyProject.Forms.Frm_SearchTaiSanCoDinh.ShowDialog();
        }

        [DebuggerNonUserCode]
        protected override void Dispose(bool disposing)
        {
            try
            {
                if (disposing && (this.components != null))
                {
                    this.components.Dispose();
                }
            }
            finally
            {
                base.Dispose(disposing);
            }
        }

        public void EmptyData()
        {
            this.TxtMaTaiSan.Text = "";
            this.TxtTenTaiSan.Text = "";
            this.CboLoaiTaiSan.SelectedIndex = -1;
            this.CboLoaiTien.SelectedIndex = -1;
            this.AdvTKNguyenGia.Value = "";
            this.AdvTKChiPhi.Value = "";
            this.AdvTKKhauHao.Value = "";
            this.CboLoaiTien.SelectedIndex = -1;
            this.txtTyGia.Value = null;
            this.TxtNguyenGiaNT.Value = null;
            this.TxtNguyenGia.Value = null;
            this.TxtDaKhauHao.Value = null;
            this.TxtTriGiaConLai.Value = null;
        }

        public void FormatNumber()
        {
            LVYModule.advFormatNumber(this.txtTyGia, this.cFrmFormat);
            LVYModule.advFormatNumber(this.TxtNguyenGiaNT, this.cFrmFormat);
            LVYModule.advFormatNumber(this.TxtNguyenGia, this.cFrmFormat);
            LVYModule.advFormatNumber(this.TxtDaKhauHao, this.cFrmFormat);
            LVYModule.advFormatNumber(this.TxtTriGiaConLai, this.cFrmFormat);
        }

        private void Frm_SoDuDauKyTaiSan_Load(object sender, EventArgs e)
        {
            BuildComboModule.BuildCombo(this.CboLoaiTaiSan, modGeneral.ListDanhMuc.LoaiTaiSan, true, "", "");
            BuildComboModule.BuildCombo(this.CboLoaiTien, modGeneral.ListDanhMuc.LoaiTien, true, "", "");
            this.cFrmFormat = modGeneral.H_FORMATNUMBER;
            this.FormatNumber();
            if (LVYModule.ReturnIfNull(this.cFrmKhoa, "", modGeneral.TypeOfValue.Nothing).ToString().Trim() != "")
            {
                this.ShowData(this.cFrmKhoa);
            }
            else
            {
                this.EmptyData();
                this.cFrmKhoa = modGeneral.CreatKey("GL_SoDuDauKyTaiKhoan", 15, "");
            }
        }

        [DebuggerStepThrough]
        private void InitializeComponent()
        {
            ComponentResourceManager manager = new ComponentResourceManager(typeof(Frm_SoDuDauKyTaiSan));
            this.GroupBox1 = new GroupBox();
            this.CmdShow = new Button();
            this.TxtTriGiaConLai = new C1NumericEdit();
            this.Label22 = new Label();
            this.TxtDaKhauHao = new C1NumericEdit();
            this.Label21 = new Label();
            this.TxtNguyenGia = new C1NumericEdit();
            this.Label20 = new Label();
            this.TxtNguyenGiaNT = new C1NumericEdit();
            this.Label17 = new Label();
            this.Label28 = new Label();
            this.Label27 = new Label();
            this.Label24 = new Label();
            this.CboLoaiTaiSan = new ComboBox();
            this.Label13 = new Label();
            this.TxtTenTaiSan = new TextBox();
            this.TxtMaTaiSan = new TextBox();
            this.Label8 = new Label();
            this.Label7 = new Label();
            this.Label6 = new Label();
            this.CboLoaiTien = new ComboBox();
            this.txtTyGia = new C1NumericEdit();
            this.Label11 = new Label();
            this.Label10 = new Label();
            this.Label12 = new Label();
            this.CmdCancel = new Button();
            this.CmdOK = new Button();
            this.AdvTKChiPhi = new ADVAccount();
            this.AdvTKKhauHao = new ADVAccount();
            this.AdvTKNguyenGia = new ADVAccount();
            this.AdvHopDong = new ADVList();
            this.AdvSanPham = new ADVList();
            this.AdvBoPhan = new ADVList();
            this.GroupBox1.SuspendLayout();
            ((ISupportInitialize) this.TxtTriGiaConLai).BeginInit();
            ((ISupportInitialize) this.TxtDaKhauHao).BeginInit();
            ((ISupportInitialize) this.TxtNguyenGia).BeginInit();
            ((ISupportInitialize) this.TxtNguyenGiaNT).BeginInit();
            ((ISupportInitialize) this.txtTyGia).BeginInit();
            this.SuspendLayout();
            this.GroupBox1.BackColor = Color.Transparent;
            this.GroupBox1.Controls.Add(this.CmdShow);
            this.GroupBox1.Controls.Add(this.TxtTriGiaConLai);
            this.GroupBox1.Controls.Add(this.Label22);
            this.GroupBox1.Controls.Add(this.TxtDaKhauHao);
            this.GroupBox1.Controls.Add(this.Label21);
            this.GroupBox1.Controls.Add(this.TxtNguyenGia);
            this.GroupBox1.Controls.Add(this.Label20);
            this.GroupBox1.Controls.Add(this.TxtNguyenGiaNT);
            this.GroupBox1.Controls.Add(this.Label17);
            this.GroupBox1.Controls.Add(this.AdvTKChiPhi);
            this.GroupBox1.Controls.Add(this.AdvTKKhauHao);
            this.GroupBox1.Controls.Add(this.AdvTKNguyenGia);
            this.GroupBox1.Controls.Add(this.Label28);
            this.GroupBox1.Controls.Add(this.Label27);
            this.GroupBox1.Controls.Add(this.Label24);
            this.GroupBox1.Controls.Add(this.CboLoaiTaiSan);
            this.GroupBox1.Controls.Add(this.Label13);
            this.GroupBox1.Controls.Add(this.TxtTenTaiSan);
            this.GroupBox1.Controls.Add(this.TxtMaTaiSan);
            this.GroupBox1.Controls.Add(this.AdvHopDong);
            this.GroupBox1.Controls.Add(this.AdvSanPham);
            this.GroupBox1.Controls.Add(this.AdvBoPhan);
            this.GroupBox1.Controls.Add(this.Label8);
            this.GroupBox1.Controls.Add(this.Label7);
            this.GroupBox1.Controls.Add(this.Label6);
            this.GroupBox1.Controls.Add(this.CboLoaiTien);
            this.GroupBox1.Controls.Add(this.txtTyGia);
            this.GroupBox1.Controls.Add(this.Label11);
            this.GroupBox1.Controls.Add(this.Label10);
            this.GroupBox1.Controls.Add(this.Label12);
            Point point = new Point(3, 0);
            this.GroupBox1.Location = point;
            this.GroupBox1.Name = "GroupBox1";
            Size size = new Size(0x1be, 0xea);
            this.GroupBox1.Size = size;
            this.GroupBox1.TabIndex = 10;
            this.GroupBox1.TabStop = false;
            this.CmdShow.BackgroundImage = ACCOUNTING.My.Resources.Resources.ButtonActive;
            this.CmdShow.FlatAppearance.BorderSize = 0;
            this.CmdShow.FlatStyle = FlatStyle.Flat;
            this.CmdShow.Font = new Font("Microsoft Sans Serif", 8.25f, FontStyle.Bold, GraphicsUnit.Point, 0xa3);
            point = new Point(0x19f, 0x12);
            this.CmdShow.Location = point;
            this.CmdShow.Name = "CmdShow";
            size = new Size(0x10, 0x10);
            this.CmdShow.Size = size;
            this.CmdShow.TabIndex = 0x8d;
            this.CmdShow.UseVisualStyleBackColor = true;
            this.TxtTriGiaConLai.BorderStyle = BorderStyle.FixedSingle;
            this.TxtTriGiaConLai.DataType = typeof(double);
            this.TxtTriGiaConLai.Enabled = false;
            this.TxtTriGiaConLai.FormatType = FormatTypeEnum.Currency;
            point = new Point(0x145, 0xc6);
            this.TxtTriGiaConLai.Location = point;
            this.TxtTriGiaConLai.Name = "TxtTriGiaConLai";
            Padding padding = new Padding(1);
            this.TxtTriGiaConLai.Padding = padding;
            this.TxtTriGiaConLai.ReadOnly = true;
            size = new Size(0x6b, 20);
            this.TxtTriGiaConLai.Size = size;
            this.TxtTriGiaConLai.TabIndex = 140;
            this.TxtTriGiaConLai.Tag = null;
            this.TxtTriGiaConLai.TextAlign = HorizontalAlignment.Right;
            this.TxtTriGiaConLai.VisibleButtons = DropDownControlButtonFlags.None;
            this.TxtTriGiaConLai.VisualStyle = VisualStyle.Office2007Blue;
            this.TxtTriGiaConLai.VisualStyleBaseStyle = VisualStyle.Office2007Blue;
            this.Label22.AutoSize = true;
            point = new Point(0xf6, 0xcd);
            this.Label22.Location = point;
            this.Label22.Name = "Label22";
            size = new Size(0x44, 13);
            this.Label22.Size = size;
            this.Label22.TabIndex = 0x8b;
            this.Label22.Text = "Gi\x00e1 trị c\x00f2n lại";
            this.TxtDaKhauHao.BorderStyle = BorderStyle.FixedSingle;
            this.TxtDaKhauHao.DataType = typeof(double);
            this.TxtDaKhauHao.Enabled = false;
            this.TxtDaKhauHao.FormatType = FormatTypeEnum.CustomFormat;
            point = new Point(0x6c, 0xc7);
            this.TxtDaKhauHao.Location = point;
            this.TxtDaKhauHao.Name = "TxtDaKhauHao";
            padding = new Padding(1);
            this.TxtDaKhauHao.Padding = padding;
            size = new Size(0x70, 20);
            this.TxtDaKhauHao.Size = size;
            this.TxtDaKhauHao.TabIndex = 0x8a;
            this.TxtDaKhauHao.Tag = null;
            this.TxtDaKhauHao.TextAlign = HorizontalAlignment.Right;
            this.TxtDaKhauHao.VisibleButtons = DropDownControlButtonFlags.None;
            this.TxtDaKhauHao.VisualStyle = VisualStyle.Office2007Blue;
            this.TxtDaKhauHao.VisualStyleBaseStyle = VisualStyle.Office2007Blue;
            this.Label21.AutoSize = true;
            point = new Point(0x13, 0xca);
            this.Label21.Location = point;
            this.Label21.Name = "Label21";
            size = new Size(0x45, 13);
            this.Label21.Size = size;
            this.Label21.TabIndex = 0x89;
            this.Label21.Text = "Đ\x00e3 khấu hao";
            this.TxtNguyenGia.BorderStyle = BorderStyle.FixedSingle;
            this.TxtNguyenGia.DataType = typeof(double);
            this.TxtNguyenGia.Enabled = false;
            this.TxtNguyenGia.FormatType = FormatTypeEnum.Currency;
            point = new Point(0x145, 0xad);
            this.TxtNguyenGia.Location = point;
            this.TxtNguyenGia.Name = "TxtNguyenGia";
            padding = new Padding(1);
            this.TxtNguyenGia.Padding = padding;
            this.TxtNguyenGia.ReadOnly = true;
            size = new Size(0x6c, 20);
            this.TxtNguyenGia.Size = size;
            this.TxtNguyenGia.TabIndex = 0x88;
            this.TxtNguyenGia.Tag = null;
            this.TxtNguyenGia.TextAlign = HorizontalAlignment.Right;
            this.TxtNguyenGia.VisibleButtons = DropDownControlButtonFlags.None;
            this.TxtNguyenGia.VisualStyle = VisualStyle.Office2007Blue;
            this.TxtNguyenGia.VisualStyleBaseStyle = VisualStyle.Office2007Blue;
            this.Label20.AutoSize = true;
            point = new Point(0xf6, 0xb1);
            this.Label20.Location = point;
            this.Label20.Name = "Label20";
            size = new Size(0x2c, 13);
            this.Label20.Size = size;
            this.Label20.TabIndex = 0x87;
            this.Label20.Text = "Quy đổi";
            this.TxtNguyenGiaNT.BorderStyle = BorderStyle.FixedSingle;
            this.TxtNguyenGiaNT.DataType = typeof(double);
            this.TxtNguyenGiaNT.Enabled = false;
            this.TxtNguyenGiaNT.FormatType = FormatTypeEnum.Currency;
            point = new Point(0x6c, 0xad);
            this.TxtNguyenGiaNT.Location = point;
            this.TxtNguyenGiaNT.Name = "TxtNguyenGiaNT";
            padding = new Padding(1);
            this.TxtNguyenGiaNT.Padding = padding;
            size = new Size(0x70, 20);
            this.TxtNguyenGiaNT.Size = size;
            this.TxtNguyenGiaNT.TabIndex = 0x86;
            this.TxtNguyenGiaNT.Tag = null;
            this.TxtNguyenGiaNT.TextAlign = HorizontalAlignment.Right;
            this.TxtNguyenGiaNT.VisibleButtons = DropDownControlButtonFlags.None;
            this.TxtNguyenGiaNT.VisualStyle = VisualStyle.Office2007Blue;
            this.TxtNguyenGiaNT.VisualStyleBaseStyle = VisualStyle.Office2007Blue;
            this.Label17.AutoSize = true;
            point = new Point(0x13, 0xb0);
            this.Label17.Location = point;
            this.Label17.Name = "Label17";
            size = new Size(0x3d, 13);
            this.Label17.Size = size;
            this.Label17.TabIndex = 0x85;
            this.Label17.Text = "Nguy\x00ean gi\x00e1";
            this.Label28.AutoEllipsis = true;
            this.Label28.AutoSize = true;
            point = new Point(0x13, 0x7c);
            this.Label28.Location = point;
            this.Label28.Name = "Label28";
            this.Label28.RightToLeft = RightToLeft.No;
            size = new Size(0x3a, 13);
            this.Label28.Size = size;
            this.Label28.TabIndex = 0x83;
            this.Label28.Text = "TK Chi ph\x00ed";
            this.Label28.TextAlign = ContentAlignment.TopRight;
            this.Label27.AutoEllipsis = true;
            this.Label27.AutoSize = true;
            point = new Point(0x13, 0x62);
            this.Label27.Location = point;
            this.Label27.Name = "Label27";
            this.Label27.RightToLeft = RightToLeft.No;
            size = new Size(0x45, 13);
            this.Label27.Size = size;
            this.Label27.TabIndex = 0x81;
            this.Label27.Text = "TK khấu hao";
            this.Label27.TextAlign = ContentAlignment.TopRight;
            this.Label24.AutoEllipsis = true;
            this.Label24.AutoSize = true;
            point = new Point(0x13, 0x48);
            this.Label24.Location = point;
            this.Label24.Name = "Label24";
            this.Label24.RightToLeft = RightToLeft.No;
            size = new Size(0x4c, 13);
            this.Label24.Size = size;
            this.Label24.TabIndex = 0x7f;
            this.Label24.Text = "TK nguy\x00ean gi\x00e1";
            this.Label24.TextAlign = ContentAlignment.TopRight;
            this.CboLoaiTaiSan.DropDownStyle = ComboBoxStyle.DropDownList;
            this.CboLoaiTaiSan.Enabled = false;
            this.CboLoaiTaiSan.FormattingEnabled = true;
            point = new Point(0x6c, 0x29);
            this.CboLoaiTaiSan.Location = point;
            this.CboLoaiTaiSan.Name = "CboLoaiTaiSan";
            size = new Size(0x144, 0x15);
            this.CboLoaiTaiSan.Size = size;
            this.CboLoaiTaiSan.TabIndex = 0x7e;
            this.Label13.AutoSize = true;
            point = new Point(0x13, 0x2e);
            this.Label13.Location = point;
            this.Label13.Name = "Label13";
            size = new Size(0x3d, 13);
            this.Label13.Size = size;
            this.Label13.TabIndex = 0x7d;
            this.Label13.Text = "Loại t\x00e0i sản";
            this.Label13.TextAlign = ContentAlignment.TopRight;
            this.TxtTenTaiSan.Enabled = false;
            point = new Point(0xbb, 0x10);
            this.TxtTenTaiSan.Location = point;
            this.TxtTenTaiSan.Name = "TxtTenTaiSan";
            size = new Size(0xf5, 20);
            this.TxtTenTaiSan.Size = size;
            this.TxtTenTaiSan.TabIndex = 0x7b;
            this.TxtMaTaiSan.Enabled = false;
            point = new Point(0x6c, 0x10);
            this.TxtMaTaiSan.Location = point;
            this.TxtMaTaiSan.Name = "TxtMaTaiSan";
            size = new Size(0x4f, 20);
            this.TxtMaTaiSan.Size = size;
            this.TxtMaTaiSan.TabIndex = 0x7a;
            this.Label8.AutoSize = true;
            point = new Point(-1, 0x174);
            this.Label8.Location = point;
            this.Label8.Name = "Label8";
            size = new Size(0x37, 13);
            this.Label8.Size = size;
            this.Label8.TabIndex = 0x71;
            this.Label8.Text = "Hợp đồng";
            this.Label7.AutoSize = true;
            point = new Point(-1, 0x157);
            this.Label7.Location = point;
            this.Label7.Name = "Label7";
            size = new Size(0x37, 13);
            this.Label7.Size = size;
            this.Label7.TabIndex = 0x70;
            this.Label7.Text = "Sản phẩm";
            this.Label6.AutoSize = true;
            point = new Point(0, 0x13a);
            this.Label6.Location = point;
            this.Label6.Name = "Label6";
            size = new Size(0x2f, 13);
            this.Label6.Size = size;
            this.Label6.TabIndex = 0x6f;
            this.Label6.Text = "Bộ phận";
            this.CboLoaiTien.Enabled = false;
            this.CboLoaiTien.FormattingEnabled = true;
            point = new Point(0x6c, 0x92);
            this.CboLoaiTien.Location = point;
            this.CboLoaiTien.Name = "CboLoaiTien";
            size = new Size(0x70, 0x15);
            this.CboLoaiTien.Size = size;
            this.CboLoaiTien.TabIndex = 1;
            this.txtTyGia.BorderStyle = BorderStyle.FixedSingle;
            this.txtTyGia.DataType = typeof(double);
            this.txtTyGia.Enabled = false;
            this.txtTyGia.FormatType = FormatTypeEnum.Currency;
            point = new Point(0x145, 0x94);
            this.txtTyGia.Location = point;
            this.txtTyGia.Name = "txtTyGia";
            padding = new Padding(1);
            this.txtTyGia.Padding = padding;
            size = new Size(0x6b, 20);
            this.txtTyGia.Size = size;
            this.txtTyGia.TabIndex = 2;
            this.txtTyGia.Tag = null;
            this.txtTyGia.VisibleButtons = DropDownControlButtonFlags.DropDown;
            this.txtTyGia.VisualStyle = VisualStyle.Office2007Blue;
            this.txtTyGia.VisualStyleBaseStyle = VisualStyle.Office2007Blue;
            this.Label11.AutoSize = true;
            point = new Point(0x13, 150);
            this.Label11.Location = point;
            this.Label11.Name = "Label11";
            size = new Size(0x2f, 13);
            this.Label11.Size = size;
            this.Label11.TabIndex = 0x3d;
            this.Label11.Text = "Loại tiền";
            this.Label11.TextAlign = ContentAlignment.TopRight;
            this.Label10.AutoSize = true;
            point = new Point(0xf6, 0x95);
            this.Label10.Location = point;
            this.Label10.Name = "Label10";
            size = new Size(0x24, 13);
            this.Label10.Size = size;
            this.Label10.TabIndex = 60;
            this.Label10.Text = "Tỷ gi\x00e1";
            this.Label10.TextAlign = ContentAlignment.TopRight;
            this.Label12.AutoSize = true;
            point = new Point(0x13, 20);
            this.Label12.Location = point;
            this.Label12.Name = "Label12";
            size = new Size(0x2a, 13);
            this.Label12.Size = size;
            this.Label12.TabIndex = 2;
            this.Label12.Text = "T\x00e0i sản";
            this.CmdCancel.DialogResult = DialogResult.Cancel;
            this.CmdCancel.Image = (Image) manager.GetObject("CmdCancel.Image");
            this.CmdCancel.ImageAlign = ContentAlignment.MiddleLeft;
            point = new Point(370, 240);
            this.CmdCancel.Location = point;
            this.CmdCancel.Name = "CmdCancel";
            size = new Size(0x4f, 0x18);
            this.CmdCancel.Size = size;
            this.CmdCancel.TabIndex = 13;
            this.CmdCancel.Text = "&Tho\x00e1t";
            this.CmdCancel.UseVisualStyleBackColor = true;
            this.CmdOK.Image = (Image) manager.GetObject("CmdOK.Image");
            this.CmdOK.ImageAlign = ContentAlignment.MiddleLeft;
            point = new Point(0x11e, 240);
            this.CmdOK.Location = point;
            this.CmdOK.Name = "CmdOK";
            size = new Size(0x4e, 0x18);
            this.CmdOK.Size = size;
            this.CmdOK.TabIndex = 12;
            this.CmdOK.Text = "&Chọn";
            this.CmdOK.UseVisualStyleBackColor = true;
            this.AdvTKChiPhi.Conditions = "";
            this.AdvTKChiPhi.DefaultValue = "";
            this.AdvTKChiPhi.Enabled = false;
            this.AdvTKChiPhi.FieldNameFilter = "Left(SoTaiKhoan,1)";
            this.AdvTKChiPhi.KeyFilter = "6";
            point = new Point(0x6c, 120);
            this.AdvTKChiPhi.Location = point;
            padding = new Padding(0);
            this.AdvTKChiPhi.Margin = padding;
            this.AdvTKChiPhi.Name = "AdvTKChiPhi";
            this.AdvTKChiPhi.OnlyDigit = false;
            this.AdvTKChiPhi.ReadOnly = false;
            size = new Size(0x144, 20);
            this.AdvTKChiPhi.Size = size;
            this.AdvTKChiPhi.TabIndex = 0x84;
            this.AdvTKChiPhi.UpperText = true;
            this.AdvTKChiPhi.Value = "";
            this.AdvTKChiPhi.WithCode = 80;
            this.AdvTKKhauHao.Conditions = "";
            this.AdvTKKhauHao.DefaultValue = "";
            this.AdvTKKhauHao.Enabled = false;
            this.AdvTKKhauHao.FieldNameFilter = "";
            this.AdvTKKhauHao.KeyFilter = "";
            point = new Point(0x6c, 0x5e);
            this.AdvTKKhauHao.Location = point;
            padding = new Padding(0);
            this.AdvTKKhauHao.Margin = padding;
            this.AdvTKKhauHao.Name = "AdvTKKhauHao";
            this.AdvTKKhauHao.OnlyDigit = false;
            this.AdvTKKhauHao.ReadOnly = false;
            size = new Size(0x144, 20);
            this.AdvTKKhauHao.Size = size;
            this.AdvTKKhauHao.TabIndex = 130;
            this.AdvTKKhauHao.UpperText = true;
            this.AdvTKKhauHao.Value = "";
            this.AdvTKKhauHao.WithCode = 80;
            this.AdvTKNguyenGia.Conditions = "";
            this.AdvTKNguyenGia.DefaultValue = "";
            this.AdvTKNguyenGia.Enabled = false;
            this.AdvTKNguyenGia.FieldNameFilter = "Left(SoTaiKhoan,3)";
            this.AdvTKNguyenGia.KeyFilter = "211";
            point = new Point(0x6c, 0x43);
            this.AdvTKNguyenGia.Location = point;
            padding = new Padding(0);
            this.AdvTKNguyenGia.Margin = padding;
            this.AdvTKNguyenGia.Name = "AdvTKNguyenGia";
            this.AdvTKNguyenGia.OnlyDigit = false;
            this.AdvTKNguyenGia.ReadOnly = false;
            size = new Size(0x144, 20);
            this.AdvTKNguyenGia.Size = size;
            this.AdvTKNguyenGia.TabIndex = 0x80;
            this.AdvTKNguyenGia.UpperText = true;
            this.AdvTKNguyenGia.Value = "";
            this.AdvTKNguyenGia.WithCode = 80;
            this.AdvHopDong.LoaiDanhMuc = ADVList.ListDanhMuc.HopDong;
            point = new Point(0x63, 0x171);
            this.AdvHopDong.Location = point;
            this.AdvHopDong.Name = "AdvHopDong";
            this.AdvHopDong.ReadOnly = false;
            size = new Size(0x141, 20);
            this.AdvHopDong.Size = size;
            this.AdvHopDong.TabIndex = 0x6d;
            this.AdvHopDong.UpperText = true;
            this.AdvHopDong.Value = "";
            this.AdvHopDong.WidthCode = 80;
            this.AdvSanPham.LoaiDanhMuc = ADVList.ListDanhMuc.SanPham;
            point = new Point(0x63, 340);
            this.AdvSanPham.Location = point;
            this.AdvSanPham.Name = "AdvSanPham";
            this.AdvSanPham.ReadOnly = false;
            size = new Size(0x141, 20);
            this.AdvSanPham.Size = size;
            this.AdvSanPham.TabIndex = 0x6c;
            this.AdvSanPham.UpperText = true;
            this.AdvSanPham.Value = "";
            this.AdvSanPham.WidthCode = 80;
            this.AdvBoPhan.LoaiDanhMuc = ADVList.ListDanhMuc.BoPhan;
            point = new Point(0x63, 0x137);
            this.AdvBoPhan.Location = point;
            this.AdvBoPhan.Name = "AdvBoPhan";
            this.AdvBoPhan.ReadOnly = false;
            size = new Size(0x141, 20);
            this.AdvBoPhan.Size = size;
            this.AdvBoPhan.TabIndex = 0x6b;
            this.AdvBoPhan.UpperText = true;
            this.AdvBoPhan.Value = "";
            this.AdvBoPhan.WidthCode = 80;
            SizeF ef = new SizeF(6f, 13f);
            this.AutoScaleDimensions = ef;
            this.AutoScaleMode = AutoScaleMode.Font;
            this.BackgroundImage = ACCOUNTING.My.Resources.Resources.background;
            size = new Size(0x1c8, 0x10b);
            this.ClientSize = size;
            this.ControlBox = false;
            this.Controls.Add(this.CmdCancel);
            this.Controls.Add(this.CmdOK);
            this.Controls.Add(this.GroupBox1);
            this.FormBorderStyle = FormBorderStyle.FixedDialog;
            this.Name = "Frm_SoDuDauKyTaiSan";
            this.StartPosition = FormStartPosition.CenterScreen;
            this.Text = "CAP NHAT SO DU DAU KY TAI SAN";
            this.GroupBox1.ResumeLayout(false);
            this.GroupBox1.PerformLayout();
            ((ISupportInitialize) this.TxtTriGiaConLai).EndInit();
            ((ISupportInitialize) this.TxtDaKhauHao).EndInit();
            ((ISupportInitialize) this.TxtNguyenGia).EndInit();
            ((ISupportInitialize) this.TxtNguyenGiaNT).EndInit();
            ((ISupportInitialize) this.txtTyGia).EndInit();
            this.ResumeLayout(false);
        }

        public void Save()
        {
            clsSoDuDauKyTaiSan objTS = this.objTS;
            objTS.Khoa = this.cFrmKhoa;
            objTS.NamThang = this.cFrmNamThang;
            objTS.KhoaDoiTuong = this.cFrmKhoa;
            objTS.LoaiTien = this.CboLoaiTien.SelectedValue.ToString().Trim();
            objTS.TyGia = Conversions.ToDouble(this.txtTyGia.Value);
            objTS.KhoaTKNguyenGia = this.AdvTKNguyenGia.Value;
            objTS.KhoaTKKhauHao = this.AdvTKKhauHao.Value;
            objTS.KhoaTKChiPhi = this.AdvTKChiPhi.Value;
            objTS.SoDuNoNT = Conversions.ToDouble(this.TxtNguyenGiaNT.Value);
            objTS.SoDuNo = Conversions.ToDouble(this.TxtNguyenGia.Value);
            objTS.SoDuCoNT = Conversions.ToDouble(Operators.DivideObject(this.TxtDaKhauHao.Value, this.txtTyGia.Value));
            objTS.SoDuCo = Conversions.ToDouble(this.TxtDaKhauHao.Value);
            objTS.KhoaDonVi = modGeneral.H_CLIENT;
            if (objTS.Save())
            {
                objTS = null;
                this.Close();
            }
        }

        public void ShowData(string pKhoa)
        {
            if (LVYModule.ReturnIfNull(pKhoa, "", modGeneral.TypeOfValue.Nothing).ToString().Trim() != "")
            {
                clsTaiSanCoDinh objTSCD = this.objTSCD;
                if (objTSCD.Load(pKhoa))
                {
                    this.cFrmKhoa = objTSCD.Khoa.Trim();
                    this.TxtMaTaiSan.Text = objTSCD.Ma;
                    this.TxtTenTaiSan.Text = objTSCD.TenViet;
                    this.CboLoaiTien.SelectedValue = objTSCD.LoaiTien.Trim();
                    this.CboLoaiTaiSan.SelectedValue = objTSCD.KhoaLoaiTaiSan;
                    this.AdvTKNguyenGia.Value = objTSCD.KhoaTKNguyenGia;
                    this.AdvTKChiPhi.Value = objTSCD.KhoaTKChiPhi;
                    this.AdvTKKhauHao.Value = objTSCD.KhoaTKKhauHao;
                    this.txtTyGia.Value = objTSCD.TyGia;
                    this.TxtNguyenGiaNT.Value = objTSCD.NguyenGiaNT;
                    this.TxtNguyenGia.Value = objTSCD.NguyenGia;
                    this.TxtDaKhauHao.Value = objTSCD.DaKhauHaoBanDau;
                    this.TxtTriGiaConLai.Value = objTSCD.GiaTriConLaiBanDau;
                    objTSCD = null;
                }
            }
        }

        internal virtual ADVList AdvBoPhan
        {
            [DebuggerNonUserCode]
            get
            {
                return this._AdvBoPhan;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._AdvBoPhan = value;
            }
        }

        internal virtual ADVList AdvHopDong
        {
            [DebuggerNonUserCode]
            get
            {
                return this._AdvHopDong;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._AdvHopDong = value;
            }
        }

        internal virtual ADVList AdvSanPham
        {
            [DebuggerNonUserCode]
            get
            {
                return this._AdvSanPham;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._AdvSanPham = value;
            }
        }

        internal virtual ADVAccount AdvTKChiPhi
        {
            [DebuggerNonUserCode]
            get
            {
                return this._AdvTKChiPhi;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._AdvTKChiPhi = value;
            }
        }

        internal virtual ADVAccount AdvTKKhauHao
        {
            [DebuggerNonUserCode]
            get
            {
                return this._AdvTKKhauHao;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._AdvTKKhauHao = value;
            }
        }

        internal virtual ADVAccount AdvTKNguyenGia
        {
            [DebuggerNonUserCode]
            get
            {
                return this._AdvTKNguyenGia;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._AdvTKNguyenGia = value;
            }
        }

        internal virtual ComboBox CboLoaiTaiSan
        {
            [DebuggerNonUserCode]
            get
            {
                return this._CboLoaiTaiSan;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._CboLoaiTaiSan = value;
            }
        }

        internal virtual ComboBox CboLoaiTien
        {
            [DebuggerNonUserCode]
            get
            {
                return this._CboLoaiTien;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._CboLoaiTien = value;
            }
        }

        internal virtual Button CmdCancel
        {
            [DebuggerNonUserCode]
            get
            {
                return this._CmdCancel;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                EventHandler handler = new EventHandler(this.CmdCancel_Click);
                if (this._CmdCancel != null)
                {
                    this._CmdCancel.Click -= handler;
                }
                this._CmdCancel = value;
                if (this._CmdCancel != null)
                {
                    this._CmdCancel.Click += handler;
                }
            }
        }

        internal virtual Button CmdOK
        {
            [DebuggerNonUserCode]
            get
            {
                return this._CmdOK;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                EventHandler handler = new EventHandler(this.CmdOK_Click);
                if (this._CmdOK != null)
                {
                    this._CmdOK.Click -= handler;
                }
                this._CmdOK = value;
                if (this._CmdOK != null)
                {
                    this._CmdOK.Click += handler;
                }
            }
        }

        internal virtual Button CmdShow
        {
            [DebuggerNonUserCode]
            get
            {
                return this._CmdShow;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                EventHandler handler = new EventHandler(this.CmdShow_Click);
                if (this._CmdShow != null)
                {
                    this._CmdShow.Click -= handler;
                }
                this._CmdShow = value;
                if (this._CmdShow != null)
                {
                    this._CmdShow.Click += handler;
                }
            }
        }

        internal virtual GroupBox GroupBox1
        {
            [DebuggerNonUserCode]
            get
            {
                return this._GroupBox1;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._GroupBox1 = value;
            }
        }

        internal virtual Label Label10
        {
            [DebuggerNonUserCode]
            get
            {
                return this._Label10;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._Label10 = value;
            }
        }

        internal virtual Label Label11
        {
            [DebuggerNonUserCode]
            get
            {
                return this._Label11;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._Label11 = value;
            }
        }

        internal virtual Label Label12
        {
            [DebuggerNonUserCode]
            get
            {
                return this._Label12;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._Label12 = value;
            }
        }

        internal virtual Label Label13
        {
            [DebuggerNonUserCode]
            get
            {
                return this._Label13;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._Label13 = value;
            }
        }

        internal virtual Label Label17
        {
            [DebuggerNonUserCode]
            get
            {
                return this._Label17;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._Label17 = value;
            }
        }

        internal virtual Label Label20
        {
            [DebuggerNonUserCode]
            get
            {
                return this._Label20;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._Label20 = value;
            }
        }

        internal virtual Label Label21
        {
            [DebuggerNonUserCode]
            get
            {
                return this._Label21;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._Label21 = value;
            }
        }

        internal virtual Label Label22
        {
            [DebuggerNonUserCode]
            get
            {
                return this._Label22;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._Label22 = value;
            }
        }

        internal virtual Label Label24
        {
            [DebuggerNonUserCode]
            get
            {
                return this._Label24;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._Label24 = value;
            }
        }

        internal virtual Label Label27
        {
            [DebuggerNonUserCode]
            get
            {
                return this._Label27;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._Label27 = value;
            }
        }

        internal virtual Label Label28
        {
            [DebuggerNonUserCode]
            get
            {
                return this._Label28;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._Label28 = value;
            }
        }

        internal virtual Label Label6
        {
            [DebuggerNonUserCode]
            get
            {
                return this._Label6;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._Label6 = value;
            }
        }

        internal virtual Label Label7
        {
            [DebuggerNonUserCode]
            get
            {
                return this._Label7;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._Label7 = value;
            }
        }

        internal virtual Label Label8
        {
            [DebuggerNonUserCode]
            get
            {
                return this._Label8;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._Label8 = value;
            }
        }

        internal virtual C1NumericEdit TxtDaKhauHao
        {
            [DebuggerNonUserCode]
            get
            {
                return this._TxtDaKhauHao;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._TxtDaKhauHao = value;
            }
        }

        internal virtual TextBox TxtMaTaiSan
        {
            [DebuggerNonUserCode]
            get
            {
                return this._TxtMaTaiSan;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._TxtMaTaiSan = value;
            }
        }

        internal virtual C1NumericEdit TxtNguyenGia
        {
            [DebuggerNonUserCode]
            get
            {
                return this._TxtNguyenGia;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._TxtNguyenGia = value;
            }
        }

        internal virtual C1NumericEdit TxtNguyenGiaNT
        {
            [DebuggerNonUserCode]
            get
            {
                return this._TxtNguyenGiaNT;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._TxtNguyenGiaNT = value;
            }
        }

        internal virtual TextBox TxtTenTaiSan
        {
            [DebuggerNonUserCode]
            get
            {
                return this._TxtTenTaiSan;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._TxtTenTaiSan = value;
            }
        }

        internal virtual C1NumericEdit TxtTriGiaConLai
        {
            [DebuggerNonUserCode]
            get
            {
                return this._TxtTriGiaConLai;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._TxtTriGiaConLai = value;
            }
        }

        internal virtual C1NumericEdit txtTyGia
        {
            [DebuggerNonUserCode]
            get
            {
                return this._txtTyGia;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._txtTyGia = value;
            }
        }
    }
}

